package book;

/**
 * @program: 11.19
 * @description:
 * @author: 李鑫月
 * @create: 2021-11-19 17:05
 **/
public class BookList {
    private  Book[] books=new Book[10];
    private int usedSize;
    public BookList(){
        books[0]=new Book("三国演义","罗贯中",24,"小说");
        books[1]=new Book("西游记","吴承恩",64,"小说");
        books[2]=new Book("水浒传","施耐庵",56,"小说");
        this.usedSize=3;
    }

    public int getUsedSize() {
        return usedSize;
    }

    public void setUsedSize(int usedSize) {
        this.usedSize = usedSize;
    }
    public Book getPos(int pos){
        return this.books[pos];
    }

    /**
     * 添加一本书
     * @param pos
     * @param book
     */
    public void setBook(int pos,Book book){
        this.books[pos]=book;
    }
}
